package com.pega.tulokhorecord.activity;

import java.util.ArrayList;
import java.util.zip.Inflater;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;

import com.pega.tulokhorecord.R;
import com.pega.tulokhorecord.activity.adapter.TurnAdapter;
import com.pega.tulokhorecord.data.TurnInfo;

public class SetDetailActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_set_detail);

		ImageView iv_share = (ImageView) findViewById(R.id.iv_set_detail_share);
		iv_share.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Toast.makeText(SetDetailActivity.this, "Share",
						Toast.LENGTH_SHORT).show();
			}
		});

		initListview();
	}

	private void initListview() {
		ArrayList<TurnInfo> turnInfos = new ArrayList<TurnInfo>();
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		turnInfos.add(new TurnInfo(0, 0, 1, 2, 3));
		

		TurnAdapter adapter = new TurnAdapter(this, turnInfos);
		ListView listView = (ListView) findViewById(R.id.lv_set_detail);
		if (listView != null) {
			listView.setAdapter(adapter);
		}
	}

}